package com.ruoyi.quartz.task;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import com.ruoyi.business.service.IBusinessReminderService;

/**
 * 业务到期提醒任务
 * 
 * @author ruoyi
 */
@Component("businessExpirationTask")
public class BusinessExpirationTask
{
    private static final Logger log = LoggerFactory.getLogger(BusinessExpirationTask.class);
    
    @Autowired
    private IBusinessReminderService businessReminderService;
    
    /**
     * 扫描即将到期业务
     */
    public void scanExpiringBusiness()
    {
        log.info("开始执行扫描即将到期业务任务");
        int count = businessReminderService.scanExpiringBusiness();
        log.info("扫描即将到期业务任务执行完毕，共创建{}个提醒任务", count);
    }
} 